# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=makekit
pkgver=0.2
pkgrel=0
pkgdesc="Modular build system for POSIX environments"
url="https://bkoropoff.github.io/makekit"
arch="x86 x86_64 aarch64"
license="BSD-3-Clause"
options="!check" # No test suite
makedepends="coreutils"
source="$pkgname-$pkgver.tar.gz::https://github.com/bkoropoff/makekit/archive/release-$pkgver.tar.gz
	makekit_alpine_aarch64.patch"

builddir="$srcdir/makekit-release-$pkgver"

prepare() {
	default_prepare
	mkdir build
}

build() {
	cd build
	../configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="7746141b253953212d621f9c4a8376b5c6bd3ac15d1809b184013a27c51006be2e2ee5ef391509486ae89b7fdca81863f8c916538bcb98e435ebf0ff1976f1ce  makekit-0.2.tar.gz
fd12583c229f0dc961f6126761459920ce222b7c88de7f3eb0cdfefbd0a67b02e218dd578855b111fae28cff4c0edeb4cd4db90a631e2c6fe20d24cb594a563d  makekit_alpine_aarch64.patch"
